<!DOCTYPE html>
<html class="login-alone">
<head>
    <title>登录</title>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
    <link href="./Public/screen.css" media="screen, projection" rel="stylesheet" type="text/css" >
    <link rel="stylesheet" type="text/css" href="./Public/base.css">
    <link rel="stylesheet" type="text/css" href="./Public/index.css">
    <script src="./Public/jquery.11.min.js"></script>
    <script>
        $(function () {
            $('input[name=vcode]').blur(function () {
                //用户填写的用户名
                var vcode = $(this).val();
                //异步
                $.ajax({
                    //请求方式
                    type:'post',
                    //请求地址
                    url:'index.php?c=Member&a=checkCode',
                    //发送数据
                    data:{code:vcode},
                    success:function (phpData) {
                        if(phpData == 1){
                            $('#codeMsg').html('<span style="color: green;" >验证码正确</span>');
                            $('#sub').attr('disabled',false);
                        }else{
                            $('#codeMsg').html('<span style="color: red;" >您输入的验证码有误</span>');
                            $('#sub').attr('disabled',true);
                        }
                    }
                })
            })
        })
    </script>
</head>
<body>
<div class="logina-logo" style="">
</div>
<div class="logina-main main clearfix">
    <div class="tab-con">
        <p style="text-align: center">账户登录</p>
        <form id="form-login" method="post" action="">
            <div id='login-error' class="error-tip"></div>
            <table border="0" cellspacing="0" cellpadding="0">
                <tbody>
                <tr>
                    <th>账户</th>
                    <td width="245">
                        <input id="email" required="" type="text" name="username" placeholder="电子邮箱/手机号" autocomplete="off" value=""></td>
                    <td>
                    </td>
                </tr>
                <tr>
                    <th>密码</th>
                    <td width="245">
                        <input required=""  id="password" type="password" name="password" placeholder="请输入密码" autocomplete="off">
                    </td>
                    <td>
                    </td>
                </tr>
                <tr id="tr-vcode"  >
                    <th>验证码</th>
                    <td width="245">
                        <div class="valid">
                            <input type="text" required="" name="vcode" placeholder="验证码"><img id="code" class="vcode" src="?c=Index&a=code" width="89" height="35" alt=""><br />
                            <a id="re" href="javascript:;">看不清，换一张</a> <span id="codeMsg"></span>
                        </div>
                    </td>
                    <td>
                    </td>
                </tr>
                <tr class="find">
                    <th></th>
                    <td>
                        <div>
                            <label class="checkbox" for="chk11"><input style="height: auto;" id="chk11" type="checkbox" name="rememberme" value="1" >七天免登录</label>
<!--                            <a href="">忘记密码？</a>-->
                        </div>
                    </td>
                    <td></td>
                </tr>
                <tr>
                    <th></th>
                    <td width="245"><input class="confirm" id="sub" type="submit" value="登  录"></td>
                    <td></td>
                </tr>
                </tbody>
            </table>
<!--            <input type="hidden" name="refer" value="site/">-->
        </form>
    </div>
    <div class="reg">
        <p><a href="index.php">返回首页</a><br><br>赶快免费注册一个吧！</p>
        <a class="reg-btn" href="?c=Member&a=reg">立即免费注册</a>
    </div>
</div>
<div id="footer">
    <div class="copyright"><?php echo date('Y-m-d',time()) ?> class70</div>
</div>
<!--<script src="res/skin/js/lib/jquery-2.0.3.min.js?v=3.9"></script>
<script src="res/skin/js/ui.common.js?v=3.9"></script>
<script src="res/passport/js/login.js?v=3.9"></script>      -->
<script type="text/javascript">
    oCode = document.getElementById("code");
    oRe = document.getElementById("re");
    var src =  oCode.src;
    oRe.onclick = function(){
        oCode.src = src + '&mt=' + Math.random();
    }
    oCode.onclick = function(){
        oCode.src = src + '&mt=' + Math.random();
    }

</script>
</body>
</html>
